package com.chen.service.impl;

import com.chen.dao.CustomerDao;
import com.chen.model.Customer;
import com.chen.service.CustomerService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service("customerService")
public class CustomerServiceImpl implements CustomerService {

    @Resource
    private CustomerDao customerDao;

    @Override
    public int toAddCustomer(Customer customer){
        return customerDao.toAddCustomer(customer);
    }

    @Override
    public List<Customer> findAllCustomer(){
        return customerDao.findAllCustomer();
    }

    @Override
    public Customer findCustomerById(Integer customer_id){
        return customerDao.findCustomerById(customer_id);
    }

    @Override
    public int updateCustomer(Customer customer){
        return customerDao.updateCustomer(customer);
    }
}
